<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>阻止默认行为</title>
    <script src="../../js/vue3.js"></script>
    <style>
        #app {
            margin: 2rem auto;
            width: 50%;
            text-align: center;
        }
        
        div>div {
            width: 300px;
            height: 300px;
            background-color: brown;
        }
        
        p {
            font-size: 1.5rem;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div id="app">
            <form action="#">
                <input type="submit" value="提交" @click.prevent>
            </form>
            <a @href="#" @click.prevent>点击</a>
       
    </div>
    <script>
        const v_app = Vue.createApp({
            data() {
                return {
                }
            }
        });
        v_app.mount("#app");
    </script>
</body>

</html>